﻿@using System.Web.Security
@model MembershipUserCollection
@{
    ViewBag.Title = "ManagesUsers";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}
<h2>
    Quản lý user</h2>
<p>
    @Html.ActionLink("Thêm mới user", "AddUser")
</p>
<table>
    <tr>
        <th>
            Stt
        </th>
        <th>
            User Name
        </th>
        <th>
            Emal
        </th>
        <th>
            Reset Password
        </th>
        <th>
        </th>
    </tr>
    @foreach (MembershipUser tbl in Model)
    {
        <tr>
            <td>
                @ViewBag.stt
            </td>
            <td>
                @tbl.UserName
            </td>
            <td>@tbl.Email
            </td>
            <td>@Html.ActionLink("Reset", "ResetPass", new { id = tbl.UserName })
            </td>
            <td>
                @Html.ActionLink("Hiệu chỉnh", "EditUser", new { id = tbl.UserName })
                |
                @Html.ActionLink("Xoá", "DelUser", new { id = tbl.UserName }, new { onclick = "return confirm('Bạn có muốn xóa user này không ?')" })
            </td>
        </tr>
        ViewBag.stt++;
    }
</table>
<br />
<div>
    @Html.ActionLink("Trang chủ", "Index")
</div>
